

export default {
    namespaced:true,//命名空间，提交mutation和派发action时，需要带上模块名
    state: {
        temp: "ddd",
        goods: [
            {
                id: "01001",
                name: "小米手机",
                price: 1999,
                stock: 100
            }
        ]
    },
    mutations: {
        addGoods(state, payload) {
            state.goods.push(payload.goods);
        },
        removeGoods() {

        }
    }

}